import request from "@/utils/request";

// 查询订单列表
export function listStoreOrder(query) {
  return request({
    url: "/business/storeOrder/list",
    method: "get",
    params: query,
  });
}

// 查询订单所有列表
export function listAllStoreOrder(query) {
  return request({
    url: "/business/storeOrder/listAll",
    method: "get",
    params: query,
  });
}
// 首页大数字
export function getData() {
  return request({
    url: "/business/storeOrder/data",
    method: "get",
  });
}
// 查询订单详细
export function getStoreOrder(id) {
  return request({
    url: "/business/storeOrder/getInfo/" + id,
    method: "get",
  });
}

// 新增订单
export function addStoreOrder(data) {
  return request({
    url: "/business/storeOrder/add",
    method: "post",
    data: data,
  });
}

// 修改订单
export function updateStoreOrder(data) {
  return request({
    url: "/business/storeOrder/edit",
    method: "post",
    data: data,
  });
}

// 删除订单
export function delStoreOrder(id) {
  return request({
    url: "/business/storeOrder/remove/" + id,
    method: "get",
  });
}

// 修改订单
export function sendStoreOrder(data) {
  return request({
    url: "/business/storeOrder/send",
    method: "post",
    data: data,
  });
}
// 核销
export function hxStoreOrder(data) {
  return request({
    url: "/business/storeOrder/verify",
    method: "post",
    data: data,
  });
}
// 订单状态
export function getNowOrderStatus(id) {
  return request({
    url: "/business/storeOrder/getNowOrderStatus/" + id,
    method: "get",
  });
}

export function getBalanceApi() {
  return request({
    url: "/business/userExtract/getBalance",
    method: "get",
  });
}

export function refundStoreOrder(data) {
  return request({
    url: "/business/storeOrder/refund",
    method: "post",
    data: data,
  });
}
